<?php
	include("include/init.php");//配置文件

	$user = new sql_class("user");

	if($_POST){
		$data = array(
				"user_phone"=>trim($_POST['user_phone']),
				"user_pw"=>md5($_POST['user_pw']),
			);

		$insert_id = $user->save($data);
		if($insert_id){
			show_msg("注册成功","login.php");
			exit;
		}else{
			show_msg("注册失败,请重新注册","register.php");
			exit;
		}
	}

	$smarty->display("register.html");



?>